package com.wan.rabbitmq.mq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 万明宇 on 2018/3/7.
 */
@Component
public class TopicSenderTest02 {

    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send(){
        String test = "TopicSenderTest02 :" + new Date();
        System.out.println(test);
        rabbitTemplate.convertAndSend("wanmingyu","topic.123123",test);
    }

}
